package week4;
import java.awt.*;

import static java.lang.System.out;
/**
 * Created by dell on 2017/3/18.
 */
public class EnumGame {
    public static void main(String[] args) {
        play(EnumAction.RIGHT);
        play(EnumAction.DOWN);
    }

    public static void play(EnumAction action) {
        switch (action) {
            case STOP:
                out.println("播放停止动画");
                break;
            case RIGHT:
                out.println("播放向右动画");
                break;
            case LEFT:
                out.println("播放向左动画");
                break;
            case UP:
                out.println("播放向上动画");
                break;
            case DOWN:
                out.println("播放向下动画");
                break;
        }
    }
}
